#!/bin/bash

www_root='/www_v'
backup_dir='/www/backup'
image_dir='public/uploads/image'

for dir in $www_root/wwwroot/* ; do
  if [[ ! -e $dir/public/uploads/image ]]; then
    continue;
  fi
  [[ ! -d $backup_dir/$dir/$image_dir ]] && mkdir -p $backup_dir/$dir/$image_dir
  zip -ur $backup_dir/$dir/$image_dir/bak.zip  $dir/$image_dir
done
